package org.shoukaiseki.common.exception;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.shoukaiseki.common.utils.StringUtils;

/**
 *  记录被更新异常
 *  //返回的前端消息已在 GlobalExceptionHandler 中写死
 **/
public class NoneRecordException extends MessageVirtualException{

    public NoneRecordException(String tableName, Object tableUniqueIdName) {
        super(StringUtils.format("记录不存在或已被删除! 表名={},主键={}",tableName,tableUniqueIdName));
    }

    public NoneRecordException() {
        super("记录不存在或已被删除!");
    }

    public NoneRecordException(@NotNull String message) {
        super(message);
    }

    public NoneRecordException(@NotNull String message, @Nullable Throwable t) {
        super(message, t);
    }
}
